package com.blb.friendsO.utils;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * IO流工具类
 */
public class IOUtils {

    /**
     * IO读写
     * @param in
     * @param out
     * @throws IOException
     */
    public static void readWrite(InputStream in, OutputStream out) throws IOException {
        byte[] data = new byte[10240];
        int len;
        while ( (len=in.read(data))!=-1){
            out.write(data, 0, len);
        }
        out.close();
        in.close();
    }
}
